/**
 * Copyright (c) 2002-2012 旭鸣信息
 * All rights reserved. 
 * File：IFrontUserAddrDao.java
 * History: Dec 27, 2012: Initially created, liuzhi.
 */
package com.xteam.ecsystem.dao;

import java.util.List;

import com.xteam.ecsystem.entities.BaseDistributeRegion;
import com.xteam.ecsystem.entities.BaseReceiveAddress;

/**
 * 前端用户-收货人地址数据访问接口
 * @author liuzhi
 *
 */
public interface IFrontUserAddrDao {

	/**
	 * 获得收货人地址数量
	 * @author liuzhi Mar 12, 2013
	 * @param braMember
	 * @return
	 */
	public int getUserAddrNums(String braMember);
	
	/**
	 * 新增或编辑收货人地址
	 * @author liuzhi Mar 18, 2013
	 * @param bra
	 * @param braId
	 * @return
	 */
	public String saveOrUpdateObj(BaseReceiveAddress bra, String braId);

	/**
	 * 获得用户收货地址列表
	 * @author liuzhi Mar 12, 2013
	 * @param braMember
	 * @return
	 */
	public List<BaseReceiveAddress> getUserAddrs(String braMember);
	
	/**
	 * 取消用户默认收货地址
	 * @author liuzhi Mar 14, 2013
	 * @param braMember
	 */
	public void saveCancelUserDefAddr(String braMember);
	
	/**
	 * 设置用户默认收货地址
	 * @author liuzhi Mar 14, 2013
	 * @param braId
	 */
	public void saveUserDefAddr(String braId);
	
	/**
	 * 根据区域编号获得区域信息
	 * @author liuzhi Mar 13, 2013
	 * @param regionId
	 * @return BaseDistributeRegion
	 */
	public BaseDistributeRegion getRegionInfo(String regionId);
	
	/**
	 * 删除用户收货地址
	 * @author liuzhi Mar 14, 2013
	 * @param braId
	 */
	public void deleteUserAddr(String braId);
	
	/**
	 * 获得区域列表
	 * @author liuzhi Mar 14, 2013
	 * @param bdrId
	 * @param bdrParent
	 * @return
	 */
	public List<BaseDistributeRegion> getRegionList(String bdrId, String bdrParent);
	
	/**
	 * 
	 * 根据用户ID获取收货信息
	 * @author ls
	 * @param memberId
	 * @return
	 */
	public BaseReceiveAddress getReceiverInfo(String memberId);

	/**
	 * 
	 * 有无收货地址
	 * @author ls
	 * @return
	 */
	public boolean hasAddress(String memberId);

	/**
	 * 根据收货地址编号获得对应的收货地址信息
	 * @author liuzhi Mar 18, 2013
	 * @param addrId
	 * @return
	 */
	public BaseReceiveAddress getReceiverInfoById(String addrId);
}
